from cProfile import label

import matplotlib.pyplot as plt
import numpy as np

plt.rcParams['font.sans-serif'] = ['SimHei']
plt.rcParams['axes.unicode_minus'] = False

data = [np.random.normal(0, std, 100) for std in range(1, 5)]
label = ['A', 'B', 'C', 'D']

plt.figure(figsize=(10, 6))
plt.violinplot(data, showmeans=True, showmedians=True)
plt.title('箱线图示例')
plt.grid(True, linestyle='--', alpha=0.5)
plt.ylabel('值')
plt.show()
